Liquid crystal displays include an alignment film formed on a surface in contact with a liquid crystal layer of an opposing substrate to achieve initial alignment of liquid crystal molecules in a liquid crystal layer. If there is a stepped portion in the surface of a flattening film located under the alignment film, the alignment film may suffer a film formation error. Under these circumstances, there has been proposed a technology of avoiding the occurrence of a large step by providing a thin film portion in an edge portion of the pattern of the flattening film.